<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
	<body style="height: 100%; width: 100%; overflow: hidden; border: none;">
		<script type="text/javascript">
			
			function addOrUpdateRole(){
				var r = $('#roleForm').form('validate');
				if(!r) {
					return false;
				}
				
				$.post("${pageContext.request.contextPath}/sys/role.do?addOrUpdate",$("#roleForm").serializeArray(),function(data){
					$('#MyPopWindow').window('close');
					$('#adminRoleTable').datagrid('reload');  
					$.messager.alert('提示',data.msg,'info');
				});
			}
			$('#rolePopPanel').panel();
		</script>
		<form id="roleForm" method="post" style="margin: 10;text-align: center;">
			<div id="rolePopPanel"  collapsible="true" style="padding:10px;">
				<div region="center" border="false" style="padding:10px;border:1px solid #ccc;">
					<input type="hidden" name="id" id="uuid">
					名称：<input type="text" id ="rolePopWindowRolename" name="rolename" style="width: 200px;border: 1px solid #ccc;padding: 2px;" validType="length[3,30]" class="easyui-validatebox" required="true" /> <br /><br />
					禁用：<input type="radio" name="isdisabled" id="isdisabled" value="1"   />是<input type="radio" name="isdisabled" id="isdisabled" value="0" checked="checked" />否
					<br />
				</div>
				<div region="south" border="false" style="text-align:right;height:30px;line-height:30px;">
					<a href="#" id="btn-back" onclick="closeWindow();" class="easyui-linkbutton" iconCls="icon-back">返回</a>
					<a href="#" id="btn-add" onclick="addOrUpdateRole();" class="easyui-linkbutton" iconCls="icon-save">保存</a>
				</div>
			</div>
		</form>
	</body></html>